namespace Cos.Core.NHibernate.Mapping
{
    using FluentNHibernate.Mapping;

    public class DataTypeMap : ClassMap<DataTypeDataModel>
    {
        public DataTypeMap()
        {
            this.Table("Datatype");
            this.LazyLoad();
            this.Id(x => x.Id).GeneratedBy.Native().Column("DatatypeID");

            this.Map(x => x.DataTypeName).Not.Nullable().Column("DatatypeName").Length(256).Unique();
            this.Map(x => x.HasMedia).Not.Nullable().Column("HasMedia");
            this.Map(x => x.IsFormField).Not.Nullable().Column("IsFormfield");
        }
    }
}